package com.ljh.cvsspringboot.contorller;

import com.ljh.cvsspringboot.entity.StorageRecord;
import com.ljh.cvsspringboot.service.StorageRecordService;
import com.ljh.cvsspringboot.service.SupplierService;
import com.ljh.cvsspringboot.service.SysRoleService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 27013
 **/

@Controller
@RequestMapping(value="/sys/storageRecord/")
public class StorageRecordController {

    @Autowired
    private StorageRecordService storageRecordService;
    @Resource
    private SupplierService SupplierService;


    @GetMapping(value = "/list")
    public String storageRecordList(Model model){
        List<StorageRecord> storageRecordList =   storageRecordService.list();;

        model.addAttribute("storageRecordList",storageRecordList).addAttribute("supplierList",SupplierService.list());
        return "storageRecord/list";
    }
}
